# $Id$
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=libgtop
pkgver=2.38.0+1+g487e584a
pkgrel=2
pkgdesc="A library that reads information about processes and the running system"
arch=('i686' 'x86_64')
license=('LGPL')
depends=('glib2' 'libxau')
makedepends=('gobject-introspection' gnome-common git gtk-doc)
_commit=487e584a18b90a413d4f866c51501ae56b552af5  # master
source=("git+https://git.gnome.org/browse/libgtop#commit=$_commit")
url="http://www.gnome.org/"
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd "${srcdir}/$pkgname"
  ./configure --prefix=/usr --sysconfdir=/etc \
      --localstatedir=/var --disable-static --enable-gtk-doc
  make
}

package() {
  cd "${srcdir}/$pkgname"
  make DESTDIR="${pkgdir}" install
}
